package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ReservationsMapper;
import com.ruoyi.system.domain.Reservations;
import com.ruoyi.system.service.IReservationsService;

/**
 * 预约Service业务层处理
 * 
 * @author guiye
 * @date 2023-08-29
 */
@Service
public class ReservationsServiceImpl extends ServiceImpl<ReservationsMapper,Reservations> implements IReservationsService
{
    @Autowired
    private ReservationsMapper reservationsMapper;

    /**
     * 查询预约
     * 
     * @param reservationId 预约主键
     * @return 预约
     */
    @Override
    public Reservations selectReservationsByReservationId(Long reservationId)
    {
        return reservationsMapper.selectReservationsByReservationId(reservationId);
    }

    /**
     * 查询预约列表
     * 
     * @param reservations 预约
     * @return 预约
     */
    @Override
    public List<Reservations> selectReservationsList(Reservations reservations)
    {
        return reservationsMapper.selectReservationsList(reservations);
    }

    /**
     * 新增预约
     * 
     * @param reservations 预约
     * @return 结果
     */
    @Override
    public int insertReservations(Reservations reservations)
    {
        return reservationsMapper.insertReservations(reservations);
    }

    /**
     * 修改预约
     * 
     * @param reservations 预约
     * @return 结果
     */
    @Override
    public int updateReservations(Reservations reservations)
    {
        return reservationsMapper.updateReservations(reservations);
    }

    /**
     * 批量删除预约
     * 
     * @param reservationIds 需要删除的预约主键
     * @return 结果
     */
    @Override
    public int deleteReservationsByReservationIds(Long[] reservationIds)
    {
        return reservationsMapper.deleteReservationsByReservationIds(reservationIds);
    }

    /**
     * 删除预约信息
     * 
     * @param reservationId 预约主键
     * @return 结果
     */
    @Override
    public int deleteReservationsByReservationId(Long reservationId)
    {
        return reservationsMapper.deleteReservationsByReservationId(reservationId);
    }
}
